<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateCategorysTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('categorys', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name')->comment('分类名称');
			$table->string('keywords', 150)->nullable()->comment('关键字');
			$table->string('description')->nullable()->comment('描述');
			$table->integer('parent')->index('parent_index')->comment('父id');
			$table->integer('order')->comment('排序');
			$table->string('path')->index('path_index')->comment('路径');
			$table->string('type', 30)->index('type_index')->comment('类型');
			$table->string('link')->nullable()->comment('链接');
			$table->string('template')->nullable()->comment('模板');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('categorys');
	}

}
